package com.atguigu.lease.common.busiexception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class BusiException extends RuntimeException{
    private Integer code ;
    private String message ;

    public BusiException(Integer code , String message){
        this.code = code ;
        this.message = message ;
    }

    public BusiException(ResultCodeEnum e){
        this.code = e.getCode() ;
        this.message = e.getMessage() ;
    }
}
